package com.zhledu.algorithm;

import java.util.Arrays;
import java.util.Scanner;

public class BadBoss {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int[] a = new int[n];
        long sum = 1;
        for (int i = 0; i < n; i++) {
            a[i] = scanner.nextInt();
            sum *= a[i];
        }
        int min = Arrays.stream(a).max().getAsInt();

        for (int i = min; i <= sum; i++) {
            boolean flag = true;
            for (int j = 0; j < a.length; j++) {
                flag = flag && i % a[j] == 0;
                if (!flag) {
                    break;
                }
            }
            if (flag) {
                System.out.println(i);
                break;
            }
        }
    }
}
